<template>
  <div class="home">
    <div class="content">
      <a-result :title="'欢迎 ' + userName + ' 进入' + web_name">
        <template #icon>
          <smile-twoTone />
        </template>
      </a-result>
    </div>
  </div>
</template>

<script lang="ts" setup>
  import { SmileTwoTone } from '@ant-design/icons-vue';
  import { ref } from 'vue';
  import { useUserStore } from '@/store/modules/user';
  import { defHttp } from '@/utils/http/axios';

  const userStore = useUserStore();
  const windowInstance: any = window;
  const web_name = ref('物联网平台');
  const userName = ref(userStore.getUserInfo.account);
  defHttp
    .get({
      url: '/SysConfig/Anonymous',
      params: { link: 'web_name' },
    })
    .then((res) => {
      web_name.value = res.data.web_name ?? web_name.value;
    });
</script>

<style lang="less" scoped>
  .home {
    height: 100%;
    width: 100%;
    display: flex;
    flex-flow: column;
    justify-content: center;
    align-items: center;

    .content {
    }
  }
</style>
